package org.thinkinbunny.financial.data;

public class TableSchemaInfo {
	public static String typeTable = "typeTable";
	public static String accountTable = "accountTable";
	public static String projectTable = "projectTable";
	public static String accountInfo = "accountInfo";

	public static String getTableSchema(int type) {
		String sqlString = "";
		// 0 1 2分别为类别 账户 项目 4预算 
		switch (type) {
		case 1:
			sqlString = "create table typeTable(_id INTEGER PRIMARY KEY,type text  UNIQUE);";
			break;
		case 2:
			sqlString = "create table accountTable(_id INTEGER PRIMARY KEY,account text  UNIQUE);";
			break;
		case 3:
			sqlString = "create table projectTable(_id INTEGER PRIMARY KEY,project text  UNIQUE);";
			break;
		case 4:
			sqlString = "create table budgetTable(_id INTEGER PRIMARY KEY,weekBudget text  UNIQUE,monthBudget text  UNIQUE);";
			break;
		case 5:
			sqlString = "CREATE TABLE fileDownloading(_id integer primary key autoincrement,downPath varchar(100),threadId INTEGER,downLength INTEGER)";
			break;
		case 0:
			sqlString = "CREATE TABLE accountInfo(_id INTEGER PRIMARY KEY, "
					+ "balance decimal(10,2) DEFAULT 0," + "billType text, "
					+ "accountname text, " + "store text, " + "project text, "
					+ "date text, " + "time time);";

		default:
			break;
		}

		return sqlString;

	}
}
